package com.mydemo.springlearning.functions.access_limit.controller;

import com.mydemo.springlearning.functions.access_limit.annotation.AccessLimit;
import com.mydemo.springlearning.common.entity.ServerResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("limit")
@Slf4j
public class LimitAccessTestController {


    @AccessLimit(maxCount = 5, seconds = 500)
    @RequestMapping("access")
    public ServerResponse accessLimit() {
        return ServerResponse.success("没有被限流");
    }


}
